<head><title>Hello Client</title></head>

<?php
	// $current_client was set in the controller file
	echo "Hello" . $current_client['Client']['first_name'];
?>

<br />
<br />

<?php
	if (isset($surveys) && is_array($surveys))
	{
	echo 'this should work';
?>

<table>
<?php foreach ($surveys as $survey) : ?>
<tr>
<td><?php echo $survey['Survey']['id']; ?></td>
<td><?php echo $survey['Survey']['name']; ?></td>
<td><?= $html->link('View Survey', '/surveys/view/'.$survey['Survey']['id']); ?></td>
<td><?php echo $survey['Survey']['client_id']; ?></td>
<tr>

<? endforeach; ?>
</table>

<?php
	}
?>

<br />
<br />

<?= $html->link('New Survey', '/surveys/add/'.$current_client['Client']['id']); ?>

<br />
<br />